package com.dhcc.model;

import javax.persistence.*;

/**
 * Created by guorui on 2017/3/17.
 */
@Entity
@Table(name = "tb_train_plan", schema = "test", catalog = "")
public class TrainPlan {
    private long tpId;
    private String trainTime;
    private int teaId;

    @Id
    @Column(name = "tp_id", nullable = false)
    public long getTpId() {
        return tpId;
    }

    public void setTpId(long tpId) {
        this.tpId = tpId;
    }

    @Basic
    @Column(name = "train_time", nullable = false, length = 10)
    public String getTrainTime() {
        return trainTime;
    }

    public void setTrainTime(String trainTime) {
        this.trainTime = trainTime;
    }

    @Basic
    @Column(name = "tea_id", nullable = false)
    public int getTeaId() {
        return teaId;
    }

    public void setTeaId(int teaId) {
        this.teaId = teaId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TrainPlan trainPlan = (TrainPlan) o;

        if (tpId != trainPlan.tpId) return false;
        if (teaId != trainPlan.teaId) return false;
        if (trainTime != null ? !trainTime.equals(trainPlan.trainTime) : trainPlan.trainTime != null) return false;

        return true;
    }
}
